import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/sysuser/getUserPage',
    method: 'get',
    params: query
  })
}

export function judgeSingle(query) {
  return request({
    url: '/sys/judgeSingle',
    method: 'get',
    params: query
  })
}

export function updateUserStatus(data) {
  return request({
    url: '/sysuser/setUserStatus',
    method: 'post',
    data
  })
}

export function userDetail(id) {
  return request({
    url: '/user/detail',
    method: 'get',
    params: {
      id
    }
  })
}


export function userAdd(data) {
  return request({
    url: '/sys/registerUser',
    method: 'post',
    data
  })
}

export function updateUser(data) {
  return request({
    url: '/sysuser/setUserInfo',
    method: 'post',
    data
  })
}